<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class AddSomeToExamsTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::table('exams', function (Blueprint $table) {
            //$table->decimal('e_jd_codes',5,2)->nullable();
            $table->integer('is_make_up')->default(0)->nullable();
            $table->integer('c_id')->nullable()->change();
        });
        Schema::table('student_exams', function (Blueprint $table) {
            $table->decimal('e_jd_codes',5,2)->nullable();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::table('exams', function (Blueprint $table) {
            $table->dropColumn('is_make_up');
            $table->integer('c_id')->change();
        });
        Schema::table('student_exams', function (Blueprint $table) {
            $table->dropColumn('e_jd_codes');
        });
    }
}
